An absolute position encoder of this type is generally arranged as follows. A plurality of channels (slit array) formed on a rotary code plate fixed on a rotating shaft on the basis of a binary code notation or a Gray code notation are arranged in accordance with a desired resolving power. An amount of light emitted from a light-emitting element and passing through each channel formed on the rotary code plate and a fixed slit portion opposing each channel is detected by a light-receiving element (photoelectric conversion element) so that a rotational position of the rotary code plate is detected as an absolute position.
In this case, to improve the detecting precision (resolving power), the number of channels must be increased. For example, to detect angular data obtained by dividing one revolution into 4096, i.e., 2.sup.12, 12 channels are required (a 12-bit code is required), and a large code plate is required in correspondence with the number of channels.
To solve the above problems, the following method has been considered. Sine wave patterns for the plurality of channels are arranged on the rotary code plate so that a plurality of sine wave outputs having different numbers of cycles per revolution can be obtained (for example, a pattern for obtaining a sine wave output having one cycle per revolution serves as a first channel, a pattern for obtaining a sine wave output having 16 cycles per revolution serves as a second channel, and a pattern for obtaining a sine wave output having 256 cycles per revolution serves as a third channel). Angular data of one wavelength of each channel is interpolated into 16 pieces. Interpolated data of the channels thus obtained are sequentially synthesized, so that the rotational position of the code plate is detected as the absolute position.
In this case, the number of channels for obtaining identical resolving powers may be small compared with the number of channels formed according to the above-mentioned binary notation (for example, to detect the absolute position by dividing one revolution into 2.sup.12, only three channels as described above are required), thereby realizing a small-size rotary code plate.
FIG. 1 illustrates an absolute position encoder for detecting angular data using a rotary code plate in which sine wave patterns of a plurality of channels having different numbers of cycles are formed. In FIG. 1, first to third channels (represented by 1.lambda., 16.lambda., and 256.lambda.) are formed on the rotary code plate. In addition, a fourth channel (a pattern for obtaining a sine wave output having 4096 cycles per revolution is arranged and represented by 4096.lambda.) is arranged. Sine wave signals 1.lambda.sin, 16.lambda.sin, 256.lambda.sin, and 4096.lambda.sin, and cosine wave signals each having an electrical phase difference of 90.degree. with respect to the corresponding sine wave signal (e.g., the cosine wave signals can be obtained by detecting by a light-receiving element and photoelectrically converting light passing through a fixed slit portion shifted from a fixed slit portion for the sine wave signals by an electrical angle of 90.degree.) 1.lambda.cos, 16.lambda.cos, 256.lambda.cos, and 4096.lambda.cos are input from each of the channels.
Reference numerals 11 to 14 denote amplifiers for respectively amplifying the sine wave signals 1.lambda.sin to 4096.lambda.sin; 21 to 24, channel selection analog switches respectively connected to output sides of the amplifiers 11 to 14; 16 to 19, amplifiers for respectively amplifying the cosine wave signals 1.lambda.cos to 4096.lambda.cos; 26 to 29, channel selection analog switches respectively connected to output sides of the amplifiers 16 to 19.
When the angular data of the rotary code plate is detected, first switches 21 and 26 are turned on, and therefore, sine and cosine wave signals 4096.lambda.sin and 4096.lambda.cos from a signal detector (corresponding light-receiving elements) are amplified by the corresponding amplifiers 11 and 16. Thereafter, these amplified signals pass through the switches 21 and 26, and are converted into digital data each having a predetermined bit by A/D converters 31 and 32, in accordance with a required resolving power. The digital data (so-called sin data Xs and cos data Xc) obtained by the A/D converters 31 and 32 are supplied to a ROM 4 as their address inputs (e.g., row and column address inputs). A product obtained by multiplying arctan Xs/Xc by an appropriate constant is converted into a binary number and stored in the ROM 4, in accordance with designated addresses (the addresses are designated by the sin and cos data Xs and Xc).
More specifically, for example, when a sine wave signal 4096.lambda.sin input at this time is 0.5 V, and a cosine wave signal 4096.lambda.cos is also 0.5 V, these signals are converted into the predetermined digital amount, e.g., "0100", by A/D converters 31 and 32 (i.e., sin and cos data Xs and Xc to be input to the ROM 4 are set to be "0100"). Therefore, when such sin and cos data are input as address signals, the ROM data stored at the corresponding addresses can be obtained as follows. That is, a product obtained by multiplying (tan.sup.-1 1=45.degree.) with a constant 1/360, i.e., 1/8, is converted into an appropriate binary number to obtain, e.g., "00100000". Among such 8-bit stored data, e.g., the upper 4 bits, i.e., "0010", are read and latched into a latch circuit 51. In this case, angular data of one wavelength of the corresponding channel (i.e., 4096.lambda.) is latched as interpolated data obtained by dividing the angular data into 16 pieces.
Then, the channel selection switches 21 and 26 are switched to the switches 22 and 27. Sine and cosine wave signals 256.lambda.sin and 256.lambda.cos input at this time are similarly converted into digital data by the A/D converters 31 and 32. The sin and cos data thus obtained are input again as address signals of the ROM 4 and the ROM data corresponding to the addresses are read as in the above case, thus latching the read data (4-bit data in this case) into a latch circuit 52.
Similarly, the channel selection switches are sequentially switched to the switches 23 and 28, and to the switches 24 and 29. The sin and cos data obtained by A/D conversion of signals 16.lambda.sin, 16.lambda.cos, 1.lambda.sin, and 1.lambda.cos input at corresponding times are input as address signals of the ROM 4. Then, the ROM data corresponding to the addresses are read out and the read data are sequentially latched into latch circuits 53 and 54.
As described above, the channels (4 channels in this case) are sequentially switched, the ROM data read by supplying two-phase input signals of the channels as predetermined address data are sequentially latched into the latch circuits, and the data of the latch circuits are synthesized. For example, the angular data of the rotary code plate can be detected in accordance with 16-bit data from the data latched by the latch circuit 54 (upper bit data) to the data latched by the latch circuit 51 (lower bit data). In this case, the absolute position thereof can be detected by setting the number of divisions per revolution to 2.sup.16 (i.e., by setting the resolving power per revolution to 1/2.sup.16).
The sine and cosine wave input signals generated by the above-mentioned channels do not always have accurate waveforms. Since the waves contain harmonics, an interpolation error occurs. In addition, an amplitude difference or phase shift (shift from phase difference of 90.degree.) actually generated between the sine and cosine input signals corresponding to the channels causes the interpolation error. When such an interpolation error exceeds a predetermined value, a fatal detection error of the angular data undesirably occurs.